﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SteamFluentAPI.Infrastructure.Base
{
    public class SteamInterfaceCollection
    {
        #region General Interfaces

        /// <summary>
        /// Methods relating to Steam Apps in general.
        /// </summary>
        [SteamInterface()]
        public SteamApps ISteamApps { get { return new SteamApps(); } }
        /// <summary>
        /// Methods relating to games' store's assets.
        /// </summary>
        [SteamInterface()]
        public SteamEconomy ISteamEconomy { get { return new SteamEconomy(); } }
        /// <summary>
        /// Methods relating to Steam News.
        /// </summary>
        [SteamInterface()]
        public SteamNews ISteamNews { get { return new SteamNews(); } }
        /// <summary>
        /// Methods relating to stored files.
        /// </summary>
        [SteamInterface()]
        public SteamRemoteStorage ISteamRemoteStorage { get { return new SteamRemoteStorage(); } }
        /// <summary>
        /// Methods relating to Steam users.
        /// </summary>
        [SteamInterface()]
        public SteamUser ISteamUser { get { return new SteamUser(); } }
        /// <summary>
        /// Methods relating to User stats.
        /// </summary>
        [SteamInterface()]
        public SteamUserStats ISteamUserStats { get { return new SteamUserStats(); } }
        /// <summary>
        /// Methods relating to a Steam user's games.
        /// </summary>
        [SteamInterface()]
        public PlayerService IPlayerService { get { return new PlayerService(); } }

        #endregion

        #region Game Specific Interfaces

        /// <summary>
        /// Methods relating to in-game items for supported games.
        /// </summary>
        [SteamInterface(true)]
        public EconItems IEconItems { get { return new EconItems(); } }

        /// <summary>
        /// (NOT IMPLEMENTED)
        /// </summary>
        [NotImplemented]
        [SteamInterface(true)]
        public GCVersion IGCVersion { get { return new GCVersion(); } }

        /// <summary>
        /// (NOT IMPLEMENTED)
        /// </summary>
        [NotImplemented]
        [SteamInterface(true)]
        public TFPromos ITFPromos { get { return new TFPromos(); } }

        #endregion

        #region Portal 2

        /// <summary>
        /// Methods relating to Portal 2 Leaderboards.
        /// </summary>
        [SteamInterface(SteamGameType.Portal2)]
        public Portal2Leaderboards IPortal2Leaderboards { get { return new Portal2Leaderboards(); } }

        #endregion

        #region Dota 2

        /// <summary>
        /// Methods relating to Dota 2 matches.
        /// </summary>
        [SteamInterface("IEconDOTA2", SteamGameType.Dota2)]
        public DOTA2 IDOTA2 { get { return new DOTA2(); } }

        /// <summary>
        /// Methods relating to Dota 2.
        /// </summary>
        [SteamInterface(SteamGameType.Dota2)]
        public DOTA2Match IDOTA2Match { get { return new DOTA2Match(); } }

        #endregion

        #region Team Fortress 2

        /// <summary>
        /// Methods relating to TF2 items.
        /// </summary>
        [SteamInterface(SteamGameType.TeamFortress2)]
        public TFItems ITFItems { get { return new TFItems(); } }

        #endregion

        #region Other Undocumented Interfaces

        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamInterface]
        public SteamGameServerAccount ISteamGameServerAccount { get { return new SteamGameServerAccount(); } }
        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamInterface]
        public SteamOAuth2 ISteamOAuth2 { get { return new SteamOAuth2(); } }
        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamInterface]
        public SteamUserAuth ISteamUserAuth { get { return new SteamUserAuth(); } }
        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamInterface]
        public SteamWebAPIUtil ISteamWebAPIUtil { get { return new SteamWebAPIUtil(); } }
        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamInterface]
        public SteamWebUserPresenceOAuth ISteamWebUserPresenceOAuth { get { return new SteamWebUserPresenceOAuth(); } }

        #endregion

        #region Hiding Methods

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override Boolean Equals(Object obj)
        {
            return base.Equals(obj);
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override Int32 GetHashCode()
        {
            return base.GetHashCode();
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override String ToString()
        {
            return base.ToString();
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public new Type GetType()
        {
            return base.GetType();
        }

        #endregion
    }

    /// <summary>
    /// Used mainly to identify Steam Interfaces
    /// </summary>
    public class SteamInterface
    {
        #region Hiding Methods

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override Boolean Equals(Object obj)
        {
            return base.Equals(obj);
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override Int32 GetHashCode()
        {
            return base.GetHashCode();
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override String ToString()
        {
            return base.ToString();
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public new Type GetType()
        {
            return base.GetType();
        }

        #endregion
    }
}
